home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / jam / jamdisk7 / inc9110b.lzh / include / sys / stat.h < prev    next >
C/C++ Source or Header  |  1991-03-18  |  3KB  |  63 lines

  1. /*
  2.  * Libraries and headers for PDC release 3.3 (C) 1989 Lionel Hummel.
  3.  * PDC Software Distribution (C) 1989 Lionel Hummel and Paul Petersen.
  4.  * PDC I/O Library (C) 1987 by J.A. Lydiatt.
  5.  *
  6.  * This code is freely redistributable upon the conditions that this 
  7.  * notice remains intact and that modified versions of this file not
  8.  * be included as part of the PDC Software Distribution without the
  9.  * express consent of the copyright holders.  No warrantee of any
  10.  * kind is provided with this code.  For further information, contact:
  11.  *
  12.  *  PDC Software Distribution    Internet:                     BIX:
  13.  *  P.O. Box 4006             or hummel@cs.uiuc.edu            lhummel
  14.  *  Urbana, IL  61801-8801       petersen@uicsrd.csrd.uiuc.edu
  15.  */
  16.  
  17. /*
  18.  * 26.2.91 sjw; moved to <sys/stat.h>, make sure only included once
  19.  * 18.3.91 sjw; fix up inter-header dependencies
  20.  */
  21.  
  22. #ifndef __STAT_H__
  23. #define __STAT_H__
  24.  
  25. #ifndef __TYPES_H__
  26. #include <sys/types.h>
  27. #endif
  28.  
  29. #ifndef __STDDEF_H__
  30. #include <stddef.h>
  31. #endif
  32.  
  33. #define S_IFMT         0170000        /* Mask for file type */
  34. #define S_IEXEC        0000100        /* Owner Execute/search permission */
  35. #define S_IWRITE       0000200        /* Owner Write permission */
  36. #define S_IREAD        0000400        /* Owner Read permission */
  37. #define S_ISVTX        0001000        /* Save swapped text after use */
  38. #define S_ISGID        0002000        /* Set group id on execution */
  39. #define S_ISUID        0004000        /* Set user id on execution */
  40. #define S_IFIFO        0010000        /* A fifo */
  41. #define S_IFCHR        0020000        /* A character special file */
  42. #define S_IFDIR        0040000        /* A directory file */
  43. #define S_IFBLK        0060000        /* A block special file */
  44. #define S_IFREG        0100000        /* A a regular file */
  45. #define S_IFLNK        0120000        /* A symbolic link (BSD) */
  46.  
  47. struct stat {
  48.     ushort st_mode;    /* File mode as used by mknod */
  49.     ino_t st_ino;      /* Inode number */
  50.     dev_t st_dev;      /* Major device number of device containing file */
  51.     dev_t st_rdev;     /* Minor device number of device containing file */
  52.     short st_nlink;    /* Number of links */
  53.     ushort st_uid;     /* File owner's user ID number */
  54.     ushort st_gid;     /* File owner's group ID number */
  55.     off_t st_size;     /* File size in bytes */
  56.     time_t st_atime;   /* Timestamp of last access to file's contents */
  57.     time_t st_mtime;   /* Timestamp of last modification of file */
  58.     time_t st_ctime;   /* Timestamp of file creation */
  59. };
  60.  
  61. #endif /* __STAT_H__ */
  62.  
  63.